Skip to content

Conversation

@rjrudin
Copy link
Contributor

@rjrudin rjrudin commented Jan 16, 2026

No description provided.

@rjrudin rjrudin requested a review from BillFarber as a code owner January 16, 2026 17:24
Copilot AI review requested due to automatic review settings January 16, 2026 17:24
@rjrudin rjrudin requested a review from stevebio as a code owner January 16, 2026 17:24
@github-actions
Copy link

Copyright Validation Results
Total: 2 | Passed: 2 | Failed: 0 | Skipped: 0 | at: 2026-01-16 17:24:27 UTC | commit: 3ed3aeb

✅ Valid Files

  • marklogic-client-api/src/main/java/com/marklogic/client/datamovement/filter/IncrementalWriteFilter.java
  • marklogic-client-api/src/main/java/com/marklogic/client/impl/OkHttpServices.java

✅ All files have valid copyright headers!

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses Polaris static analysis findings by adding null safety checks and removing redundant null checks.

Changes:

  • Added explicit null check with Objects.requireNonNull() for response object
  • Removed redundant null check for response object that was already guaranteed non-null
  • Added early return for null content in serialization method

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
OkHttpServices.java Enforces non-null response contract and removes redundant null check
IncrementalWriteFilter.java Adds null safety check for content serialization

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


Response response = sendRequestWithRetry(requestBldr, sendRequestFunction, resendableConsumer);

Objects.requireNonNull(response);
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Objects.requireNonNull() call should include a descriptive error message as the second parameter to help with debugging if the response is unexpectedly null. For example: Objects.requireNonNull(response, \"Response from sendRequestWithRetry cannot be null\").

Suggested change
Objects.requireNonNull(response);
Objects.requireNonNull(response, "Response from sendRequestWithRetry cannot be null");

Copilot uses AI. Check for mistakes.
@rjrudin rjrudin merged commit af01d9a into develop Jan 16, 2026
4 checks passed
@rjrudin rjrudin deleted the feature/polaris branch January 16, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants